package cn.lingyangwl.agile.infra.module.file.model.entity;

import cn.lingyangwl.agile.model.BasePlusPO;
import cn.lingyangwl.agile.tenant.core.DataIsolation;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.Getter;
import lombok.Setter;

/**
 * 素材
 *
 * @author shenguangyang
 */
@Getter
@Setter
@TableName("infra_media_material")
@DataIsolation(filterMainTenant = true, filterTenant = true, tableName = "infra_media_material")
public class MediaMaterial extends BasePlusPO {
	private Long id;
	
	/**
	 * 素材地址
	 */
	private String url;

	/**
	 * 文件记录id, 即文件名
	 * @see FileRecord#id
	 */
	private String fileRecordId;
	
	/**
	 * 名称
	 */
	private String name;
	
	/**
	 * 素材类型
	 */
	private String type;

	/**
	 * 文件大小, 单位是字节
	 */
	private Long size;
	
	/**
	 * 素材分组id
	 */
	private Long groupId;

    public static LambdaQueryWrapper<MediaMaterial> lqw() {
		return Wrappers.lambdaQuery();
	}

	public static LambdaUpdateWrapper<MediaMaterial> luw() {
		return Wrappers.lambdaUpdate();
	}
}
